.message-list {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  display: flex;
  gap: 10px;
  max-width: 70%;
  position: relative;
}

.message.self {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.other {
  align-self: flex-start;
}

.message.system-message {
  align-self: center;
  background-color: #f6ffed;
  border: 1px solid #b7eb8f;
  color: #52c41a;
  max-width: 90%;
  text-align: center;
  padding: 8px 15px;
  border-radius: 8px;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: #1890ff;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 500;
  flex-shrink: 0;
}

.message-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: calc(100% - 50px);
}

.message-username {
  font-size: 12px;
  color: #666;
}

.message-content {
  padding: 10px 15px;
  border-radius: 8px;
  word-break: break-word;
  position: relative;
}

.message.self .message-content {
  background-color: #e6f7ff;
  border: 1px solid #bae7ff;
}

.message.other .message-content {
  background-color: #f5f5f5;
  border: 1px solid #e8e8e8;
}

.message-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
}

.message-time {
  font-size: 12px;
  color: #999;
}

.recall-button {
  background: none;
  border: none;
  color: #ff4d4f;
  cursor: pointer;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 4px;
}

.recall-button:hover {
  background-color: #fff1f0;
}

.message-text {
  padding: 12px 16px;
  border-radius: 8px;
  background-color: rgba(214, 234, 255, 0.8);
  word-break: break-word;
  cursor: pointer;
}

.message.own .message-text {
  background-color: rgba(24, 144, 255, 0.9);
  color: white;
}

.message.system .message-text {
  background-color: rgba(230, 247, 255, 0.7);
  color: #666;
  font-size: 14px;
}

.mention-text {
  color: #1890ff;
  font-weight: 500;
  background-color: rgba(24, 144, 255, 0.1);
  padding: 0 4px;
  border-radius: 2px;
  margin: 0 2px;
}

.message.own .mention-text {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.2);
}

/* 已撤回消息样式 */
.message.recalled .message-text {
  color: #999;
  font-style: italic;
  background-color: rgba(0, 0, 0, 0.05);
  cursor: not-allowed;
}

.message.recalled .message-actions {
  display: none;
}

.message-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.message.recalled .message-content {
  background-color: #f5f5f5;
  color: #999;
  font-style: italic;
  border: 1px dashed #d9d9d9;
}

.message.recalled .recall-button {
  display: none;
}

/* 响应式布局 */
@media (max-width: 768px) {
  .message {
    max-width: 85%;
  }
  
  .message-avatar {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }
}